﻿using System;
using System.Text;

namespace DbExtendedProvider
{
	public interface IEncryption : IDisposable
	{
		string GenerateSalt(int minChars,
		                    int maxChars);

		int GenerateTrueRandomNumber(int min,
		                             int max);

		byte[] GenerateHash(string toHash,
		                    string salt);

		byte[] EncryptString(byte[] toEncrypt,
		                     byte[] encryptionKey);

		byte[] EncryptString(string toEncrypt,
		                     byte[] encryptionKey);

		byte[] DecryptString(byte[] encryptedString,
		                     byte[] encryptionKey);

		byte[] GenerateKey();

		Encoding Encoding { get; }

		bool ValidateKey(byte[] encryptionKey, params byte[][] supplementalKeys);
	}
}